<!--<?php
print <<<EOT
-->
<script language="javascript" src="images/admin/admin.js"></script>
<div class="m"></div>
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="tr4"><td colspan="7">
  <input type="button" name="Submit5" value="服务器一览" class="btn" onclick="window.location='$basename';"/>
  <input type="button" name="Submit5" value="添加新服务器" class="btn" onclick="window.location='$basename&action=add';"/></td>
</tr>
</table>
</div>
<!--
EOT;
if(!$action){
print <<<EOT
-->
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="head">
  <td colspan="9">存储服务器管理</td>
</tr>
<tr class="tr2">
  <td width="5%">&nbsp;</td>
  <td>ID</td>
  <td>存储点名称</td>
  <td>读写路径</td>
  <td>访问网址</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>管理操作</td>
</tr>
<!--
EOT;
foreach($serverdb as $admin){
$delurl = EncodeUrl("$basename&action=del&uid=$admin[uid]");
print <<<EOT
-->
<tr class="tr3">
  <td><img src="images/admin/computer.png" align="absmiddle" /></td>
  <td>$admin[serverid]</td>
  <td>$admin[servername]</td>
  <td>$admin[serverpath] &nbsp;</td>
  <td>$admin[serverurl]</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td><a href="$basename&action=edit&serverid=$admin[serverid]"><img src="images/admin/edit.png" align="absmiddle" alt="编辑" /></a> <a href="$basename&action=del&serverid=$admin[serverid]"><img src="images/admin/delete.png" align="absmiddle" alt="删除" /></a>  </td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<!--
EOT;
}elseif($action=='add' || $action=='edit'){
print <<<EOT
-->
<form action="$basename" method="post">
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="head">
  <td colspan="3">添加新存储服务器</td>
</tr>
<tr class="line">
  <td width="20%">存储点名称</td>
  <td width="80%" colspan="2"><input name="servername" type="text" class="input" id="servername" value="$edit[servername]" />
    *</td>
</tr>
<tr class="line">
  <td>存储点读写路径</td>
  <td><input name="serverpath" type="text" class="input" id="serverpath" value="$edit[serverpath]" size="50"  onfocus="showWarning('s1');"/>
    *  </td>
  <td><div class="noticemsg" id="s1">相对于管理服务器的访问路径</div></td>
</tr>
<tr class="line">
  <td>相对转码服务路径</td>
  <td><input name="serverpath2" type="text" class="input" id="serverpath2" value="$edit[serverpath2]" size="50"  onfocus="showWarning('s2');"/>
    *  </td>
  <td><div class="noticemsg" id="s2">相对于转码服务器的访问路径</div></td>
</tr>
<tr class="line">
  <td>存储挂载方式</td>
  <td onclick="showWarning('s3');">    
  <input type="radio" name="single" value="0" $single_N  onchange="document.getElementById('s4').innerHTML = '相对路径，最后要有斜杠/';" />
    同管理服务器 
	<input type="radio" name="single" value="1" $single_Y   onchange="document.getElementById('s4').innerHTML = '请填写完整网址，最后要有斜杠/';" />
    独立提供下载*(存储是一台独立的服务器)</td>
  <td><DIV class="noticemsg" id="s3">（是否存在管理服务器上）</DIV></td>
</tr>
<tr class="line">
  <td>存储访问网址</td>
  <td>
  <input name="serverurl" type="text" class="input" id="serverurl" value="$edit[serverurl]" size="60"   onfocus="showWarning('s4');" /> </td>
  <td>   <div class="noticemsg" id="s4">
    *(最后面要有 / 斜杠)</div></td>
</tr>
</table>
</div>
<center>
  <input name="action" type="hidden" id="action" value="$action" />
  <input name="serverid" type="hidden" id="serverid" value="$edit[serverid]">
  <input type="submit" name="Submit" value=" 提 交 " class="btn"> 
  <input type="reset" name="Submit2" value=" 重 置 " class="btn">
</center>
</form>
<!--
EOT;
}
?>-->